﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Snowdreamist.Collection.Tree;

namespace Snowdreamist.Text.UBB
{
    /// <summary>
    /// UBB document, represents a ubb document
    /// </summary>
    public class UBBDocument : TreeBase<UBBElement>
    {
        public UBBDocument()
        {
            this.Root = new RootUBBElement();
        }

        public override UBBElement CreateTreeNode()
        {
            throw new NotSupportedException();
        }

        public override string ToString()
        {
            return this.Root.ToString();
        }

        private class RootUBBElement : UBBElement
        {
            public RootUBBElement() : base("Root") { }

            public override object Clone()
            {
                throw new NotSupportedException();
            }
        }
    }
}